package com.ynny.chapter04.service;

import com.ynny.chapter04.entity.UserDTO;
import com.ynny.chapter04.exception.UserNotFoundException;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl {

    public void edit(UserDTO userDTO){

        if (!userDTO.getName().equals("admin")){

            throw new UserNotFoundException("用户名错误");
        }

    }

}
